package com.leyou.gateway.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;

@Data
@ConfigurationProperties(prefix = "ly.cors") //把配置文件前缀为“ly.cors”的信息，读取并自动封装成实体类
public class CORSProperties {
    private List<String> allowedOrigins; //允许的域，可为多个域，用默认List集合存储
    private Boolean allowedCredentials; //是否允许开启cookie
    private List<String> allowedMethods; //允许的请求方式，默认为List集合
    private List<String> allowedHeaders;//允许的请求头，采用*统配
    private Long maxAge;
    private String filterPath;  //添加映射路径，我们拦截一切请求
}
